<template>
  <div class="navigator">
    <div class="navigator-item" v-for="(item, index) in dataList" :key="item.id">
      <span>{{ item.name }}</span>
      <span class="navigator-division" v-if="index !== dataList.length - 1">></span>
    </div>
  </div>
</template>

<script>
export default {
  name: 'navigator',
  props: {
    navigatorList: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      dataList: []
    }
  },
  watch: {
    navigatorList() {
      this.dataList = this.navigatorList
    }
  },
  created() {
    this.dataList = this.navigatorList
  },
  methods: {}
}
</script>
<style scoped>
.navigator {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  color: #444;
  box-sizing: border-box;
}
.navigator-division {
  margin: 0 6px;
}
</style>
